package com.weiyuwqj.server.service.account.module.action.debt;

import com.weiyuwqj.api.constant.DealType;
import com.weiyuwqj.api.util.IpUtils;
import com.weiyuwqj.server.service.account.module.action.AbstractDealAction;

import java.util.Date;

/**
 * Created by zhangyong on 2017/3/24.
 * 债权投资撤回
 */
public class DebtRecallDealAction extends AbstractDealAction {

    public DebtRecallDealAction() {
        log.setOperType(DealType.DEBT_RECALL);
    }

    @Override
    public void dealAccount() {
        log.setFrozen(log.getOperMoney().negate());
        log.setUsable(log.getOperMoney());
        log.setCash(log.getOperMoney());
        log.setAddip(IpUtils.get());
        log.setAddtime(new Date());
        log.setBudgetType(1);
    }
}
